<?php

namespace App\Models\Api;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Order extends Model
{
    use HasFactory;
    use HasDateTimeFormatter;

    //订单表
    protected $table = 'order';
    protected $guarded = [];

    //查看用户记录的支付明细
    public static function getUserOrderData($user_id)
    {
        return self::where('user_id', $user_id)->get();
    }

}
